<template>
  <iframe
    :src="designSrc"
    frameborder="no"
    style="width: 100%;"
    :height="height"
    scrolling="auto"
  />
</template>
<script>
  import { getToken } from '@/utils/auth'
  import { config } from '@/utils'
  export default {
    data() {
      return {
        // designSrc: 'http://192.168.1.88:8088/ureport/designer',
        designSrc: config.baseURL + '/urule/frame?Authorization=' + getToken(),
        height: document.documentElement.clientHeight - 94.5 + 'px;',
        loading: true
      }
    },
    computed: {
      token() {
        return 'Bearer ' + getToken()
      },
      backUrl() {
        return config.baseURL
      }
    },
    mounted() {
      window.getMyVue = this
      // const baseURL = config.baseURL
      // console.log(baseURL)
      // this.designSrc = 'http://192.168.1.88:8088/ureport/designer'
      setTimeout(() => {
        this.loading = false
      }, 230)
      const that = this
      window.onresize = function temp() {
        that.height = document.documentElement.clientHeight - 94.5 + 'px;'
      }
    },
    method() {
    }
  }
</script>
<style scoped>

</style>
